com.highdeal.pnr.hci
Class BatchRatingGroupModel

java.lang.Object
  extended by com.highdeal.pnr.hci.BatchRatingGroupModel
All Implemented Interfaces:
XMLMarshallable, java.lang.Comparable<BatchRatingGroupModel>

public class BatchRatingGroupModel
extends java.lang.Object
implements XMLMarshallable, java.lang.Comparable<BatchRatingGroupModel>

This Java class represents a batch rating group configured in the SAP CC. The SAP CC system may handle offline and online charging services at the same time. Some subscriptions are charged in batch using the SAP CC BART Server system whereas others may be charged using other mechanism (online mediation). Batch rating group is used to represent a set of hybrid and/or offline subscriptions that share common rating (and implicitly billing) cycles.

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="batchRatingGroup">
  <xs:complexType>
    <xs:attribute name="id" type="xs:integer" />
    <xs:attribute name="code" type="xs:string" />
    <xs:attribute name="description" type="xs:string" />
  </xs:complexType>
 </xs:element>


Field Summary
static short BATCH_RATING_GROUP_UNSET
           
static short DEFAULT_BATCH_RATING_GROUP_ID
           
static short MAX_BATCH_RATING_GROUP_ID
           
static java.lang.String OPERATION_NAME
          The XML tag name: "batchRatingGroup"
 
Constructor Summary
BatchRatingGroupModel()
           
BatchRatingGroupModel(short batchRatingGroupId, java.lang.String code, java.lang.String description)
          Creates a batch rating group uniquely identified by its batch rating group identifier (shared with SAP CC BART Server, if available) and its batch rating group code.
 
Method Summary
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChild(java.lang.String tagName, XMLMarshallable child)
          Adds a child to the object, the child representing the marshallable object which must be added to the element.
 int compareTo(BatchRatingGroupModel batchRatingGroup)
           
 java.lang.String getBatchRatingGroupCode()
          Returns the batch rating group code that must be not empty and must be unique.
 java.lang.String getBatchRatingGroupDescription()
          Returns the batch rating group description that must be not empty.
 short getBatchRatingGroupId()
          Returns the batch rating group identifier that must be unique.
static java.lang.String getName()
          Gets the name of the related XML element.
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, including its children.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 void setBatchRatingGroupCode(java.lang.String code)
          Sets the batch rating group code that must be not empty and must be unique.
 void setBatchRatingGroupDescription(java.lang.String description)
          Sets the batch rating group description that must be not empty.
 void setBatchRatingGroupId(short id)
          Sets the batch rating group identifier that must be unique.
 java.lang.String toString()
           
 boolean validate()
          Checks that identifier, name and description have been correctly filled in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OPERATION_NAME

public static final java.lang.String OPERATION_NAME
The XML tag name: "batchRatingGroup"

See Also:
Constant Field Values

BATCH_RATING_GROUP_UNSET

public static final short BATCH_RATING_GROUP_UNSET
See Also:
Constant Field Values

DEFAULT_BATCH_RATING_GROUP_ID

public static final short DEFAULT_BATCH_RATING_GROUP_ID
See Also:
Constant Field Values

MAX_BATCH_RATING_GROUP_ID

public static final short MAX_BATCH_RATING_GROUP_ID
See Also:
Constant Field Values
Constructor Detail

BatchRatingGroupModel

public BatchRatingGroupModel()

BatchRatingGroupModel

public BatchRatingGroupModel(short batchRatingGroupId,
                             java.lang.String code,
                             java.lang.String description)
Creates a batch rating group uniquely identified by its batch rating group identifier (shared with SAP CC BART Server, if available) and its batch rating group code.

Parameters:
batchRatingGroupId - The unique identifier of the batch rating group. This identifier must be greater than DEFAULT_BATCH_RATING_GROUP_ID and smaller than MAX_BATCH_RATING_GROUP_ID.
code - The code of the batch rating group, must not be empty
description - The description of the batch rating group, must not be empty
Method Detail

getName

public static java.lang.String getName()
Gets the name of the related XML element.

Returns:
The name

getBatchRatingGroupId

public final short getBatchRatingGroupId()
Returns the batch rating group identifier that must be unique.

Returns:
The batch rating group identifier

setBatchRatingGroupId

public void setBatchRatingGroupId(short id)
Sets the batch rating group identifier that must be unique.

Parameters:
id - The batch rating group identifier

getBatchRatingGroupCode

public final java.lang.String getBatchRatingGroupCode()
Returns the batch rating group code that must be not empty and must be unique.

Returns:
The batch rating group code

setBatchRatingGroupCode

public void setBatchRatingGroupCode(java.lang.String code)
Sets the batch rating group code that must be not empty and must be unique.

Parameters:
code - The batch rating group code

getBatchRatingGroupDescription

public final java.lang.String getBatchRatingGroupDescription()
Returns the batch rating group description that must be not empty.

Returns:
The batch rating group description

setBatchRatingGroupDescription

public void setBatchRatingGroupDescription(java.lang.String description)
Sets the batch rating group description that must be not empty.

Parameters:
description - The batch rating group description

validate

public boolean validate()
                 throws java.lang.IllegalStateException
Checks that identifier, name and description have been correctly filled in.

Returns:
true if the batch rating group is valid, false otherwise
Throws:
java.lang.IllegalStateException

compareTo

public int compareTo(BatchRatingGroupModel batchRatingGroup)
Specified by:
compareTo in interface java.lang.Comparable<BatchRatingGroupModel>

addCharacterData

public void addCharacterData(java.lang.String cData)
Description copied from interface: XMLMarshallable
Adds character data to the content element.

Specified by:
addCharacterData in interface XMLMarshallable
Parameters:
cData - The character data to be added

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Description copied from interface: XMLMarshallable
Adds a child to the object, the child representing the marshallable object which must be added to the element.

Specified by:
addChild in interface XMLMarshallable
Parameters:
tagName - The name of tag for the child
child - The child to be added

marshal

public void marshal(XMLOutputter output)
Description copied from interface: XMLMarshallable
Gives an XML representation of this object, including its children.

Specified by:
marshal in interface XMLMarshallable
Parameters:
output - The XML output to marshal the object into

setAttributes

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the element being processed.

Specified by:
setAttributes in interface XMLMarshallable
Parameters:
atts - The XML attributes of the current element

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)